package cn.maihe.elg.operation.centers.quanzhou.dto.notice;

import cn.maihe.elg.operation.centers.quanzhou.dto.QuanzhouBaseRespDTO;
import lombok.Getter;
import lombok.Setter;

/**
 * @Description 泉州中心投保成功通知响应DTO
 * @Author xxx
 * @Date 2025/08/31
 */
@Getter
@Setter
public class QuanzhouApplyResultNoticeRespDTO extends QuanzhouBaseRespDTO {
    
    public QuanzhouApplyResultNoticeRespDTO() {
        super();
    }
    
    public QuanzhouApplyResultNoticeRespDTO(String code, String message) {
        super(code, message);
    }
    
    public static QuanzhouApplyResultNoticeRespDTO success(String message) {
        QuanzhouApplyResultNoticeRespDTO resp = new QuanzhouApplyResultNoticeRespDTO("1", message);
        resp.setData(new ValidationData("1", ""));
        return resp;
    }
    
    public static QuanzhouApplyResultNoticeRespDTO failure(String message, String reason) {
        QuanzhouApplyResultNoticeRespDTO resp = new QuanzhouApplyResultNoticeRespDTO("1", message);
        resp.setData(new ValidationData("0", reason));
        return resp;
    }
    
    @Getter
    @Setter
    public static class ValidationData {
        /**
         * 1：检验成功，0：检验失败
         */
        private String issuccess;
        
        /**
         * 检验失败原因
         */
        private String reason;
        
        public ValidationData(String issuccess, String reason) {
            this.issuccess = issuccess;
            this.reason = reason;
        }
    }
}